package com.nuotu.datawall.clouddata.util;

import android.widget.Toast;

import org.xutils.x;


public class ToastUtils {
    private static Toast mToast;

    public static void toastLong(String str) {

//        if (mToast == null) {
            mToast = Toast.makeText(x.app(), str, Toast.LENGTH_LONG);
     /*   } else {
            mToast.setText(str);
            mToast.setDuration(Toast.LENGTH_LONG);
        }*/
        mToast.show();

    }

    public static void toastShort(String str) {

        if (mToast == null) {
            mToast = Toast.makeText(x.app(), str, Toast.LENGTH_SHORT);
        } else {
            mToast.setText(str);
            mToast.setDuration(Toast.LENGTH_SHORT);
        }
        mToast.show();
    }
}
